package com.hc.util;

import java.io.IOException;
import java.util.Iterator;

import com.hc.model.ChartModel;
import com.hc.util.fillData.FillData;

public class notifyListenImpl implements notifyListener{
//  
//	public void setLisntert() {
//		com.hc.ftp.Util.listener = this;
//	}
	@Override
	public synchronized void notifyHandler(String path) {

		
	     
	     String[] s = path.split("_");
	     
	     if(ChartModel.filePathList.size()==0){
	    	 
	    	 ChartModel.filePathList.add(path);
	     }else{
	    	 
	    	Iterator<String> it= ChartModel.filePathList.iterator();
				while (it.hasNext()) {
					String value = it.next();
					String[] f = value.split("_");
					if (f[0].equals(s[0])) {
						it.remove();
					}
				}
	    	 ChartModel.filePathList.add(path);
	    	 
	     }

		
	}

}
